<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org" lang="zh-CN">

<div th:fragment="content">
    <div class="form-group">
        <label class="col-sm-2 control-label">帐号 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4">
            <input class="form-control" name="username" type="text" maxlength="32" dbsyncer-valid="require" placeholder="root" th:value="${connector?.config?.username}"/>
        </div>
        <label class="col-sm-2 control-label">密码 <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-4 ">
            <input class="form-control" name="password" type="password" maxlength="32" dbsyncer-valid="require"
                   th:value="${connector?.config?.password}"/>
        </div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label">URL <strong class="driverVerifcateRequired">*</strong></label>
        <div class="col-sm-10">
            <textarea name="url" class="form-control dbsyncer_textarea_resize_none" maxlength="1024"
                      dbsyncer-valid="require" rows="5"
                      th:text="${connector?.config?.url}?:'jdbc:mysql://127.0.0.1:3306/test?rewriteBatchedStatements=true&amp;useUnicode=true&amp;characterEncoding=UTF8&amp;serverTimezone=Asia/Shanghai&amp;useSSL=false&amp;verifyServerCertificate=false&amp;autoReconnect=true&amp;failOverReadOnly=false'"></textarea>
        </div>
    </div>

    <!-- SQL配置 -->
    <div th:replace="connector/addSQL :: content"></div>

    <div class="form-group">
        <label class="col-sm-2 control-label">SQL</label>
        <div class="col-sm-10">
            <textarea id="sql" name="sql" class="sql form-control dbsyncer_textarea_resize_none" maxlength="8192" rows="10">SELECT T1.* FROM USER T1</textarea>
        </div>
    </div>

    <script type="text/javascript">
        $(function () {
            // 初始化select插件
            initSelectIndex($(".select-control"), 1);
        })
    </script>
</div>

</html>